<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let money=0;
        let i=0;
        while(true){
        let num=Number(prompt(`欢迎来到贱行,请选择你的服务
        1 存钱
        2 取钱
        3 查看余额
        4 退出`));
        switch(num){
            case 1:
                i=Number(prompt(`输入存入金额`));
                money+=i;
                continue;
            
            case 2:
                i=Number(prompt(`输入取出金额`));
                if(money>=i){
                money-=i;}
                else{alert(`余额不足`)}
                continue;
                

            case 3:
                alert(`余额为：${money}`);
                continue;
                
            case 4:
                alert(`see you`);
                break;
        }
        break;
        }
    </script>
</body>
</html>